<?php

namespace app\api\controller\ai;

use app\common\controller\BaseController;
use app\common\service\ai\WxPayService;
use hg\apidoc\annotation as Apidoc;
use \app\common\service\ai\OrderService;

/**
 * @Apidoc\Title("订单管理")
 * @Apidoc\Group("ai")
 * @Apidoc\Sort("300")
 */
class Order extends BaseController {

    /**
     * @Apidoc\Title("列表")
     * @Apidoc\Param(ref="app\common\model\ai\OrderModel", field="member_id,type")
     * @Apidoc\Returned("list", type="array", desc="列表", children={
     * @Apidoc\Returned(ref="app\common\model\ai\OrderModel", withoutField="sdc"),
     * })
     */
    public function getList() {
        $list = OrderService::getList($this->data);
        return success($list);
    }

    /**
     * @Apidoc\Title("提交")
     * @Apidoc\Method("POST")
     * @Apidoc\Param(ref="app\common\model\ai\OrderModel", field="member_id,sale_price")
     * @Apidoc\Returned("order_no", type="string", require=true, desc="订单号")
     * })
     */
    public function submit() {
        OrderService::submit($this->data, 1, 0, 1);
    }




}
